//1.创建app.js文件
//2.下载express
const express = require('express')
const { createProxyMiddleware } = require('http-proxy-middleware');

const app = express()
app.use('/api', createProxyMiddleware({ 
    target: 'https://api.iynn.cn/film/api/v1', //换成自己的地址
    changeOrigin: true ,
    pathRewrite: {
        "^/api": ""
      }
}));


//静态资源托管
app.use(express.static('dist'))
app.listen(12345)
